<%@ Page Language="vb" Debug="true"%>
<%@ Import namespace="MyWebServices" %>
<script language="vb" runat="server">
Private Sub CheckUser(ByVal sender As System.Object, _
	ByVal e As System.EventArgs)
	If txtUsername.Text<>"" then
	    Dim ws As New MyWebServices.MySQLServerWebService()
	    	lblResult.Text = "Result: " & _
		iif(ws.getResult(txtUsername.Text), _
		"Existing","Not existing")	    
	Else
		lblResult.Text="Please enter your Username."
	End if
End Sub
</script>
<html>
    <body>
      <h2>Call Web Services with SQL Server 
	(MySQLServerWebService)</h2>
        <form id="Form1" method="post" runat="server">
            	<asp:Label id="lbUser"  runat="server" >
	Username: </asp:Label><br />
	<asp:TextBox id="txtUsername" runat="server">
	</asp:TextBox><br /><br />   
	<asp:Button  id="cmdSave" runat="server"  
	Text="Check UserName" OnClick="CheckUser">
	</asp:Button>	           
	<br />   
	<asp:Label id="lblResult" runat="server">
	</asp:Label>		
        </form>
    </body>
</html>
